package top.aniss.spark.beifeng.common;

/**
 * @author Andre Wei
 * create 2018-07-11 下午1:24
 */
public class Const {

    /**
     * 数据库相关的常量
     */
    public interface JDBC {
        String DRIVER = "jdbc.driver";
        String DATASOURCE_SIZE = "jdbc.datasource.size";
        String USERNAME = "jdbc.username";
        String PASSWORD = "jdbc.password";
        String URL = "jdbc.url";
    }

    public interface SPARK {
        String LOCAL = "spark.local";
        String TASK_TYPE = "spark.task.type";
        String APP_NAME = "UserVisitSessionAnalyzeSpark";


        String FIELD_SESSION_ID = "sessionid";
        String FIELD_CLICK_CATEGORY_IDS = "clickCategoryIds";
        String FIELD_SEARCH_KEYWORDS = "searchKeywords";

        String FIELD_AGE = "age";
        String FIELD_PROFESSIONAL = "professional";
        String FIELD_CITY = "city";
        String FIELD_SEX = "sex";
        String FIELD_VISIT_LENGTH = "visitLength";
        String FIELD_STEP_LENGTH = "stepLength";
        String FIELD_START_TIME = "startTime";
        String FIELD_CLICK_COUNT = "clickCount";
        String FIELD_ORDER_COUNT = "orderCount";
        String FIELD_PAY_COUNT = "payCount";
        String FIELD_CATEGORY_ID = "categoryid";

        /**
         * 任务相关测常量
         */
        String PARAM_START_DATE = "startDate";
        String PARAM_END_DATE = "endDate";
        String PARAM_START_AGE = "startAge";
        String PARAM_END_AGE = "endAge";
        String PARAM_PROFESSIONALS = "professionals";
        String PARAM_SEX = "sex";
        String PARAM_KEYWORDS = "keywords";
        String PARAM_CATEGORY_IDS = "categoryIds";
        String PARAM_CITIES = "cities";

    }

    public interface SESSION {
        String SESSION_COUNT = "session_count";

        String VISIT_LENGTH_1s_3s = "1s_3s";
        String VISIT_LENGTH_4s_6s = "4s_6s";
        String VISIT_LENGTH_7s_9s = "7s_9s";
        String VISIT_LENGTH_10s_30s = "10s_30s";
        String VISIT_LENGTH_30s_60s = "30s_60s";
        String VISIT_LENGTH_1m_3m = "1m_3m";
        String VISIT_LENGTH_3m_10m = "3m_10m";
        String VISIT_LENGTH_10m_30m = "10m_30m";
        String VISIT_LENGTH_30m = "30m";

        String STEP_PERIOD_1_3 = "1_3";
        String STEP_PERIOD_4_6 = "4_6";
        String STEP_PERIOD_7_9 = "7_9";
        String STEP_PERIOD_10_30 = "10_30";
        String STEP_PERIOD_30_60 = "30_60";
        String STEP_PERIOD_60 = "60";
    }
}
